import React, { Component } from 'react'
import { FormattedMessage } from 'react-intl'
import { Icon } from 'antd-mobile'
import { hashHistory } from 'react-router'

export default class AccountName extends Component {
  render() {
    const { name } = this.props
    return (
      <div className="rt-account-name">
        <div className="-left">
          <span><img src={require('static/images/chat_01.png')}/></span>
        </div>
        <div className="-center">
          <span>{'奥利维亚'}</span>
          <span className="-font">
            <FormattedMessage id="account1"/>
            <span>ID: 131****5678</span>
          </span>
        </div>
        <div
          className="-right"
          onClick={
            () => {
              hashHistory.push('/account/condition')
            }
          }
        >
          <span>
            <FormattedMessage id="account1"/>
            <FormattedMessage id="set"/>
          </span>
          <Icon type="right"/>
        </div>
      </div>
    )
  }
}
